<template> 
    <div class="msg-page clear-both"> 
        <div class="content">
            <div v-if="prop.length!=0">
                <video-list v-for="(item,index) in prop" :key="index" :title="item.title" :imgUrl="item.thumb" :item="item" :index="index" :time="item.length" :hits="item.records" :text="item.description" @jump="jumpDetail"></video-list>
            </div> 
            <div class="text-center data-null" v-else>暂无数据</div>
        </div>
    </div> 
</template>

<script>
import videoList from './tpl/video-list' 

export default {
    props: {
        prop:{
            default:[],
            type:Array
        }
    },
    data () {
        return {
            
        }
    },
    methods:{
        jumpDetail(item,index){
            let url='';
            if(item.tabs.type==1){
                url= `./../audio-detail/main?adId=${item.id}&itemIndex=${index}&tab_id=${item.tab_id}`; 
            }else{
               url = `./../video-detail/main?vidId=${item.id}&itemIndex=${index}&tab_id=${item.tab_id}`; 
            } 
            wx.navigateTo({url})  
        },
    },
    components: {
        videoList
    },
}
</script>

<style scoped lang="scss">
.msg-page{ 
    padding-top:10rpx;
    padding-bottom:20rpx;
    .data-null{
        font-size:30rpx;
        color:#ccc;
        margin-top:50rpx;
    }
}
</style>
